﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ApplicantSite.Master" AutoEventWireup="true"
    CodeBehind="Telerik-Manual.aspx.cs" Inherits="SRM.TestTelerikManual" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" namespace="System.Web.UI.WebControls" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainBody" runat="server">
    <div>
        <telerik:RadGrid ID="FamilyParticularsRadGrid" runat="server" AutoGenerateColumns="False"
         
            GridLines="None" OnEditCommand="FamilyParticularsRadGrid_EditCommand" OnItemDataBound="FamilyParticularsRadGrid_ItemDataBound"
            OnDeleteCommand="FamilyParticularsRadGrid_DeleteCommand" 
            OnInsertCommand="FamilyParticularsRadGrid_InsertCommand" 
            onupdatecommand="FamilyParticularsRadGrid_UpdateCommand">
            <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
            </ClientSettings>
            <MasterTableView CommandItemDisplay="Top" DataKeyNames="FamilyMemberKey" EditMode="EditForms">
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
                <NoRecordsTemplate>
                    No records.
                </NoRecordsTemplate>
                <Columns>
                    <telerik:GridBoundColumn HeaderText="Name" UniqueName="NameColumn" DataField="MemberName" />
                    <telerik:GridTemplateColumn HeaderText="Relationship" DataField="Relationship" UniqueName="RelationshipColumn">
                        <ItemTemplate>
                            <%# Eval("Relationship")%>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:DropDownList ID="RelationshipDropDownList" runat="server" AutoPostBack="true"
                                AppendDataBoundItems="True" DataTextField="Description" DataValueField="CodeName"
                                OnSelectedIndexChanged="RelationshipDropDownList_SelectedIndexChanged">
                                <asp:ListItem Selected="True" Text="--Please Select---" Value=""></asp:ListItem>
                            </asp:DropDownList>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridDateTimeColumn HeaderText="Date of Birth" UniqueName="DateOfBirthColumn" 
                        DataField="BirthDate" DataFormatString="dd/MM/yyyy" DataType="System.DateTime">
                    </telerik:GridDateTimeColumn>
                    <telerik:GridDateTimeColumn HeaderText="Date of Marriage" UniqueName="DateOfMarriageColumn" 
                        DataField="DateOfMarriage" DataFormatString="dd/MM/yyyy" DataType="System.DateTime" Visible="False" Display="False">
                    </telerik:GridDateTimeColumn>
                    <telerik:GridBoundColumn HeaderText="Nationality" UniqueName="NationalityColumn"
                        DataField="Nationality" />
                    <telerik:GridBoundColumn HeaderText="Occupation" UniqueName="OccupationColumn" DataField="Occupation" />
                    <telerik:GridBoundColumn HeaderText="Employer" UniqueName="EmployerColumn" DataField="FamilyEmployer" />
                    <telerik:GridTemplateColumn DataField="EmergencyContact" HeaderText="Emergency Contact"
                        UniqueName="EmergencyContactColumn">
                        <EditItemTemplate>
                            <asp:DropDownList runat="server" ID="EmergencyContactDropDownList" AppendDataBoundItems="true"
                                SelectedValue='<%# Bind("EmergencyContact") %>'>
                                <asp:ListItem Selected="True" Text="--Please Select---" Value=""></asp:ListItem>
                                <asp:ListItem Text="YES" Value="YES"></asp:ListItem>
                                <asp:ListItem Text="NO" Value="NO"></asp:ListItem>
                            </asp:DropDownList>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="EmergencyContactLabel" runat="server" Text='<%# Eval("EmergencyContact") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn HeaderText="Contact No" UniqueName="ContactNoColumn" DataField="ContactNo" />
                    <telerik:GridButtonColumn HeaderText="Edit" UniqueName="EditColumn" ButtonType="ImageButton"
                        CommandName="Edit">
                        <HeaderStyle Width="30px" />
                        <ItemStyle HorizontalAlign="Center" />
                    </telerik:GridButtonColumn>
                    <telerik:GridButtonColumn HeaderText="Delete" UniqueName="DeleteColumn" ButtonType="ImageButton"
                        CommandName="Delete">
                        <HeaderStyle Width="30px" />
                        <ItemStyle HorizontalAlign="Center" />
                    </telerik:GridButtonColumn>
                </Columns>
                <CommandItemTemplate>
                    <div style="height: 2.2em;">
                        <asp:ImageButton ID="ImageButton1" ImageUrl="Images/Grid/AddRecord.gif" runat="server"
                            CommandName="InitInsert" ImageAlign="Middle" />
                        <asp:LinkButton ID="LinkButton1" Text="Add New Record" runat="server" CommandName="InitInsert"
                            CssClass="valign-bottom aaa" />
                    </div>
                </CommandItemTemplate>
                <EditFormSettings EditFormType="Template">
                <FormTemplate>
                    
                    <p>
                    Add your mumbo jumbo form here.
                    </p>
                </FormTemplate>
                </EditFormSettings>
            </MasterTableView>
            
        </telerik:RadGrid>

        <hr />


        <br />
    </div>
</asp:Content>
